<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:s="http://java.sun.com/jsp/jstl/core"
	xmlns:rich="http://richfaces.org/rich">

<ui:composition template="/template.xhtml">
	<ui:define name="title">Forgot password</ui:define>
	<ui:define name="content">
		<div id="head" align="center">
			<h:outputText value="#{label.forgotPassword}"
				style="font-size: 30px;" />
			<hr></hr>
		</div>
		<h:form id="forgotPassForm">
			<table>
				<tr>
					<td><h:outputText value="#{label.email}" /></td>
					<td><h:inputText id="email"
							value="#{userAction.forgotPasswordEmail}" rendered="true" required="true"
							validatorMessage="#{message.invalidEmail}">
							<f:validateRegex
								pattern="^(([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+([;.](([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+)*$"></f:validateRegex>
							<rich:validator />
						</h:inputText></td>
				</tr>
				<tr>
					<td colspan="2"><rich:message for="email" errorClass="error" />
					</td>
				</tr>
			</table>
			<h:commandButton value="#{label.sendPassword}"
				action="#{userAction.sendNewPassword}" />
			<br />
			<rich:message for="forgotPassForm" infoStyle="color: green;"
				errorStyle="color: red;" styleClass="errorMessage" />
		</h:form>
	</ui:define>
</ui:composition>
</html>